{include file="public/header" /}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.css"}
{load href="__PLUGINS__bootstrap/bootstrap-table.min.js"}
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }
    #id {
        width: 78px;
    }
    .bs-checkbox {
        width: 36px;
        height: 40px
    }
    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0px;
        margin-top: 0px
    }
    #title span {
        float: right;
        margin-left: 3.333px;
    }
    .search {
        margin-bottom: 0px !important;
    }
    .asdlkjasd {
        background: #1ab394;
        color: #fff
    }
    #title {
        position: relative;
        padding-right: 50px;
    }
    #title span {
        position: absolute;
        top: 12px;
        right: 10px;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="ibox float-e-margins">
        {include file="public/tophead"}
        {include file="public/top" /}
        <div class="ibox-content">
            {include file="public/topsection"}
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar">
                        <form  method="get" action="">
                            <div class="pull-left search">
                                <div class="pull-left search" style="display: flex;">
                                    {eq name='isadmin' value='1'}
                                    <input name="userid" type="text" id="userid" class="form-control layui-input" value="{present name='userId'}{$userId}{/present}" placeholder=" # 用户id" autocomplete="off" style="height:34px;width:110px;margin:0 10px;">
                                    {/eq}
                                    <input name="start" type="text" id="start" class="form-control layui-input" value="{present name='start'}{$start}{/present}" placeholder=" # 起始时间" autocomplete="off" style="height:34px;width:180px;margin:0 10px;">
                                    <input name="end" type="text" id="end" class="form-control layui-input" value="{present name='end'}{$end}{/present}" placeholder=" # 结束时间" autocomplete="off" style="height:34px;width:180px;margin:0 10px;">
                                </div>
                                <div class="pull-right search">
                                    <button style="border-radius:0px; border:1px solid #e5e6e7;" class="btn btn-default btn-outline" type="submit">搜索</button>
                                    <button style="border-radius:0px; border:1px solid #e5e6e7;" class="btn btn-default btn-outline" type="button" onclick="reloadPageWithoutParams()">清空</button>
                                </div>
                            </div>
                        </form>
                    </div>

                    <div style="display:block;clear: both;"></div>
                    <style>
                        .search{
                            position: relative;
                            left:-10px;
                        }
                        .example{
                            margin-top:20px;
                            margin-bottom: 300px;
                        }
                        .example p{
                            line-height: 30px;
                        }
                    </style>
                    <div class="example">
                        <!--<p>充值金额：{$totalRecharge}元</p>-->
                        <!--<p>会员充值：{$totalVipRecharge}元</p>-->
                        <!--<p>会员总数：{$memberCount}人</p>-->
                        {if condition="$start eq '' and $end eq ''"}
                        <p style="color:blue;">今日新增：{$todayNewMembers}人</p>
                        <p style="color:blue;">今日充值金额：{$todayRecharge}元</p>
                        <p style="color:blue;">今日会员充值：{$todayVipRecharge}元</p>
                        <hr>
                        <p style="color:blue;">昨日新增：{$yesdayNewMembers}人</p>
                        <p style="color:blue;">昨日充值金额：{$yesdayRecharge}元</p>
                        <p style="color:blue;">昨日会员金额：{$yesdayVipRecharge}元</p>
                        {/if}
                    </div>
                </div>
            </div>
            <hr>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script type="text/javascript">
    $(document).ready(function(){
        layui.use(['laydate'], function(){
            var laydate = layui.laydate;

            laydate.render({
                elem: '#start' //指定元素
                ,type: 'datetime'
                ,trigger: 'click'
            });

            laydate.render({
                elem: '#end' //指定元素
                ,type: 'datetime'
                ,trigger: 'click'
            });
        })
    });
</script>
<script>
    /**
     * 重载当前页面（不带任何参数）
     */
    function reloadPageWithoutParams() {
        // 获取当前URL的协议、域名和路径部分（不包含查询参数和哈希）
        const baseUrl = window.location.origin + window.location.pathname;

        // 跳转到无参数的URL
        window.location.href = baseUrl;

        // 或者使用以下方式（效果相同）
        // window.location.replace(baseUrl);
    }
</script>
